<?php get_header('page');?>
<style>
 .content-box-1
{
			margin-top:15px;	
}
</style>
<body>
<div id="topbg"></div>
<div id="container">
	<div id="header">
    	<?php include TEMPLATEPATH.'/controllers/banner/controller-banner.php';?>
        <?php require_once TEMPLATEPATH.'/views/menu/view-menu.php';?>
    </div>
    
    <div id="mid">
    	<div id="box-content">
            <!-- begin breadcrumb -->
            <?php require_once TEMPLATEPATH.'/views/breadcrumb/view-breadcrumb.php';?>
            <!-- end #breadcrumb -->
  			<?php 
            require_once TEMPLATEPATH.'/orders/process.php';
            ## xu ly thanh toan sau khi thanh toan paypal
            if(isset($_POST['payment_status']))
	        {
	        	//print_r($_POST);
	        	 $item_number    = $_POST['item_number'];
	             $payment_status = $_POST['payment_status'];	             
	             $payment_gross  = $_POST['payment_gross'];
	             
	             $result = db_table_get_id_by("orders", $item_number);
	             if($result)
	             {
	                 $paymentID = $result[0]->paymentID;
	                 //db_update_table_field_id($paymentID, "paymentStatus", $payment_status); 
	                 db_update_payment_after($paymentID,$payment_status,$payment_gross);
	             }	
	             require_once TEMPLATEPATH.'/views/book/view-hotel-tour-thanks.php';
	        }            		
            else 
            {
	            if(isset($_GET['booked']) && $_GET['booked'] != null)  // thuc hien booked
	            {
	            	if($_GET['booked'] == 'tour')
	            	{
	            		include TEMPLATEPATH.'/views/tour/view-booked-tour.php';
	            	}
	            	else if($_GET['booked'] == 'hotel')
	            	{
	            		include TEMPLATEPATH.'/views/hotel/view-booked-hotel.php';
	            	}
	            	else if($_GET['booked'] == 'ticket')
	            	{
	            		include TEMPLATEPATH.'/views/book/view-booked-ticket.php';
	            	}
	            } 
	            else 
	            {
	            	wp_redirect(get_bloginfo('home'));
	            }	            
            }
            ?>
        </div>
        
        <?php include TEMPLATEPATH.'/sidebar.php';?>
    </div>
    
    <?php //include TEMPLATEPATH.'/views/testimonial/view-home-testimonial.php';?>
    <?php get_footer('page');?>
